package com.lagou.edu.demo.controlller;

import com.lagou.edu.demo.service.IDemoService;
import com.lagou.edu.mvcframework.annotations.LagouAutowired;
import com.lagou.edu.mvcframework.annotations.LagouController;
import com.lagou.edu.mvcframework.annotations.LagouRequestMapping;
import com.lagou.edu.mvcframework.annotations.LagouSecurity;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

/**
 * @author fanbo@imoran.net
 * @date 2021/1/6 22:54
 */
@LagouSecurity({"zhaoliu", "chenqi"})
@LagouController
@LagouRequestMapping("/securityclass")
public class SecurityTestDemoClassController {


    @LagouAutowired
    private IDemoService demoService;

    @LagouRequestMapping("/test01")
    public String test1(HttpServletRequest request, HttpServletResponse response, String username) {
        return demoService.get(username);
    }

    @LagouRequestMapping("/test2")
    public String test2(HttpServletRequest request, HttpServletResponse response, String username) {
        return demoService.get(username);
    }

    @LagouRequestMapping("/test3")
    public String test3(HttpServletRequest request, HttpServletResponse response, String username) {
        return demoService.get(username);
    }
}
